import request from '@/utils/request'

const api_name = '/eduservice/video'

// 课时管理接口
export default {


    //添加小节
    addVideo(eduVideo) {
        return request({
            url: `${api_name}/addVideo`,
            method: 'post',
            data: eduVideo
        })
    },

    //根据id查询小节信息
    getVideoInfoById(id) {
        return request({
            url: `${api_name}/videoInfo/${id}`,
            method: 'get'
        })
    },

    //更新小节信息
    updateVideoInfo(eduVideo) {
        return request({
            url: `${api_name}/updateVideoInfo`,
            method: 'post',
            data: eduVideo
        })
    },

    //删除小节
    deleteVideo(id) {
        return request({
            url: `${api_name}/deleteVideo/${id}`,
            method: 'delete'
        })
    },

    //阿里云删除视频
    deleteVideoByID(videoId) {
        return request({
            url: `/eduVod/video/removeVideo/${videoId}`,
            method: 'delete'
        })
    },

}